from flask_restful import Api

from apps.settingApi.api.users.views import loginListView,loginPkView,loginView,refreshView,logOutView

# 登录验证方法：
# 添加请求头：Authorization
# 值为Bearer +token

user_api = Api(prefix='/setting/user/')

# 用户列表查询个新增接口
user_api.add_resource(loginListView,'/loginlist/',endpoint="loginlist")
# 用户单个操作接口
user_api.add_resource(loginPkView,'/loginpk/<pk>/',endpoint="loginpk")

# 用户登录
user_api.add_resource(loginView,'/login/',endpoint="login")

# 刷新token
user_api.add_resource(refreshView,'/refresh/',endpoint="refresh")

# 用户退出（post管理员剔除用户，put用户自己下线）
user_api.add_resource(logOutView,'/logout/',endpoint="logoutlist")
